namespace java com.chengzhi.netty.thrift

typedef i16 short
typedef i32 int
typedef i64 long
typedef string String
typedef bool boolean

struct Student {
    1: String name;
}

struct Person {
    1: String name;
    2: int age;
    3: boolean sex;
    4: list<Student> stus;
    5: map<String, String> maps;
}

const String CONST_TEST1 = "CONST_TEST1"
const String CONST_TEST2 = "CONST_TEST2"

exception DataInfoException {
    1: int code;
    2: String message;
}

service PersonService {
    Person getPersonByName(1: String name) throws (1: DataInfoException dataInfoException);
    void savePerson(1: Person person) throws (1: DataInfoException dataInfoException)
}
/**
 * 使用 thrift --gen java FileName 生成java代码
 **/
